package com.job.pojo;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

@TableName("education")
@AllArgsConstructor
@NoArgsConstructor
@Data
@ApiModel("教育经历表")
@Document(indexName = "education")
public class Education implements Serializable {

    @Id
    @TableId
    @ApiModelProperty("教育经历id")
    private Integer id;

    @Field(type = FieldType.Text)
    @ApiModelProperty("学校名称")
    private String school;

    @Field(type = FieldType.Integer)
    @ApiModelProperty("学历(0大专、1本科、2专科)")
    private Integer xl;

    @Field(type = FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_smart")
    @ApiModelProperty("专业")
    private String major;

    @Field(type = FieldType.Integer)
    @ApiModelProperty("学生id")
    private Integer studentId;
}
